<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<script language="JavaScript" src="scripts/ts_picker.js"></script>
<style type="text/css">
.style3 {
	height: 23px;
}

#Select1 {
	width: 176px;
}

.style4 {
	width: 187px;
	height: 26px;
}

.style5 {
	height: 26px;
}

.style6 {
	height: 80px;
}

#Reset1 {
	width: 66px;
}

#Submit1 {
	width: 65px;
}

#TextArea1 {
	width: 571px;
	height: 67px;
}
</style>
<title>Apply For Leave</title>


<script type="text/javascript">



function checkapplydata(){

if(document.leaveform.comment.value==""){
alert("please leave reason");
return false;
}


return true;

}
   
  </script>


</head>
<body>
	<h1>Leave Application</h1>

	<form id="leaveform" action="ApplyLeaveServelet.java" method="POST"
		name="tstest" onSubmit="return checkapplydata();">
		<table cellpadding=4 cellspacing=2 border=0>
			<tr>
				<td class="style4">Employee Name:</td>
				<td><label>${sessionScope.employee.SurName}</label>
				</td>
			</tr>
			<tr>
				<td class="style4">Leave Type:</td>
				<td class="style3"><input name='leavetype' id='leavetype'
					type="Text" readonly="readonly" value = <%=request.getattribute("leavetype") %>/></td>
			</tr>
			<tr>
				<td class="style3">Remain Days:</td>
				<td class="style3"><input name='remaindays' id='remaindays'
					type="Text" readonly="readonly" value = ${remaindays} /></td>
			</tr>

			<tr>
				<td class="style3">Start Date:</td>
				<td class="style3"><input name='startdate' id='startdate'
					type="Text" readonly="readonly" value = ${startdate} /></td>
			</tr>
			<tr>
				<td>End Date:</td>
				<td class="style3"><input name='enddate' id='enddate'
					type="Text" readonly="readonly" value = ${enddate} /></td>
			</tr>
			<tr>
				<td class="style3">Leave Period:</td>
				<td class="style3"><input name="leaveperiod" id="leaveperiod"
					type="Text" readonly="readonly" value = ${leaveperiod} /></td>
			</tr>
			<tr>
				<td class="style6">Reason:</td>
				<td class="style6"><textarea id="comment" name="comment"
						style="width: 326px; height: 65px"></textarea>
				</td>
			</tr>

			<tr>
				<td class="style3">Work Dissemination:</td>
				<td class="style3"><input name="workdissemination"
					id="workdissemination" type="text" />
				</td>
			</tr>
			<tr>
				<td class="style3">ContactDetail:</td>
				<td class="style3"><input name="contactdetail"
					id="contactdetail" type="text" />
				</td>
			</tr>
			<tr>
				<td><input name="Submit" id="Submit" type="submit"
					value="submit" />
				</td>
				<td><input name="Reset" id="Reset" type="reset" value="reset" />
				</td>
			</tr>
		</table>
	</form>



</body>
</html>